package viewmodel;


import com.xgggh.redpack.domain.wallet.Wallet;
import javax.inject.Inject;
import io.reactivex.Flowable;
import model.Rsp;
import repository.WalletRepository;

public class WalletViewModel extends BaseViewModel<WalletRepository> {
    WalletRepository repository;

    @Inject
    public WalletViewModel(WalletRepository repository) {
        this.repository = repository;
    }

    public Flowable<Rsp<Wallet>> getWallet() {
        Flowable<Rsp<Wallet>>  rsp=repository.getWallet();
        return rsp;
    }

    public Flowable<Rsp> putWallet(Wallet wallet) {
        Flowable<Rsp> data=repository.putWallet(wallet);
        return data;
    }

}
